package org.minions.controller;

import org.minions.properties.UserProperty;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author cm
 */
@RestController
@RequestMapping("/hello")
public class HelloController {

    @Autowired
    private UserProperty userProperty;

    @RequestMapping(value = "/say")
    public String say(@RequestParam(value = "id", required = false, defaultValue = "0") Integer id) {
        return "hello " + id + " " + userProperty;
    }
}
